home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Awards / MacUser Shareware Awards 94 / System Enhancements / 1. KeyQuencer 1.2 / Developer’s toolkit / Extension code / A4Globals.h next >
Text File  |  1994-07-31  |  2KB  |  47 lines

  1. // =============================================================================
  2. // KEYQUENCER EXTENSIONS A4 GLOBAL STORAGE - VERSION 1.2 - AUGUST 1994
  3. // ©1994 Alessandro Levi Montalcini <lmontalcini@pmn.it>
  4. // Don’t forget to send me any cool extensions you create!
  5. // This text looks best in monaco 9 font, 4 spaces per tab, no wrapping
  6.  
  7. #ifndef _H_a4globals
  8. #define _H_a4globals
  9.  
  10. //==============================================================================
  11.  
  12.     #if defined(powerc) || defined(__powerc) // powerpc (not tested)
  13.     
  14.         #define MAIN_SETUP_GLOBALS(x)
  15.         #define MAIN_RESTORE_GLOBALS(x)
  16.         #define TEMP_SETUP_GLOBALS(x)
  17.         #define TEMP_RESTORE_GLOBALS(x)
  18.     
  19.     #elif defined(THINK_C) // think c
  20.     
  21.         #include <SetUpA4.h>
  22.         #define MAIN_SETUP_GLOBALS(x)    { RememberA0(); SetUpA4(); asm { MOVE.L (A7)+, x } }
  23.         #define MAIN_RESTORE_GLOBALS(x)    { asm { MOVE.L x, -(A7) } RestoreA4(); }
  24.         #define TEMP_SETUP_GLOBALS(x)    { SetUpA4(); asm { MOVE.L (A7)+, x } }
  25.         #define TEMP_RESTORE_GLOBALS(x)    { asm { MOVE.L x, -(A7) } RestoreA4(); }
  26.         
  27.     #elif defined(__MWERKS__) // code warrior
  28.     
  29.         #include <A4Stuff.h>
  30.         #include <SetUpA4.h>
  31.         #define MAIN_SETUP_GLOBALS(x)    { x = SetCurrentA4(); RememberA4(); }
  32.         #define MAIN_RESTORE_GLOBALS(x)    { (void)SetA4(x); }
  33.         #define TEMP_SETUP_GLOBALS(x)    { x = SetUpA4(); }
  34.         #define TEMP_RESTORE_GLOBALS(x)    { (void)RestoreA4(x); }
  35.     
  36.     #else // unknown compiler, stop here
  37.     
  38.         *** unsupported compiler ! ****
  39.     
  40.     #endif // end of compiler-specific stuff
  41.  
  42. //==============================================================================
  43.  
  44. #endif // _H_a4globals
  45.  
  46. //==============================================================================
  47.